In text processing, the format of the text is often controlled by formatting directives embedded in the text data stream. In prior art text processing programs, once these formatting directives are specified they become effective until they are changed by another directive. As such, the controls have no history. As soon as one of these controls is executed to change the value of a formatting parameter, the previous value of that formatting parameter, before modification, is forgotten by the system. Thus, in such systems, formatting changes become very restrictive because of the necessity of documenting the present values of the formatting parameters before they are changed temporarily, for those cases in which it is desired to return to an earlier format.
For example, a text application may process a long quotation by indenting the leading and trailing margin of the quotation, by changing the type font, and by changing the line spacing in a double spaced document to single spacing for the indented quotation. The original margin values, font choice, and line spacing are to be restored when the long quote is completed. In a modal system, such as that described above, when the long quote is formatted (when formatting directives are used to shift the margins and line spacing, and to change the font face), the value of the original margins, line spacing, and font face are lost to the process. When the long quote is over, the operator must reestablish the original margins, line spacing, and font face by keying new formatting directives. This assumes that the operator knew the value of the original margins, line spacing and, and font face before the temporary format changes. In some applications this may be true, but in less structured applications the operator may be keying text which will be composed to a specific margin, line spacing, and font at a later time. Thus, all the operator knows at the time of keying is that the margins are to be shifted in, the line spacing is to be changed, and the font is to be changed to italic for the long quotes, and further, that the current (but not necessarily original) format parameters are to be restored at the end of the quotation.
Therefore, in this less structured case, the final formatting of the text is linked to the final destination of the text data. If this final destination is not known at the time of the keying of the text, the formatting directives associated with the text cannot be input with the text, and the text will have to be edited for each subsequent composition. It is certainly desirable to format all of the text at the time it is keyed, thus eliminating the need to edit the text when it is being composed into its final form.
In the prior art, attempts have been made to surmount these problems by providing a master format buffer which stores a set of formatting states of a document. This technique has been expanded to include a second, alternate format buffer which stores an alternate set of formatting states of a document, as is the case with the IBM Personal Computer DisplayWrite 3 word processing program. In view of this, additional alternate format buffers are possible, but each of these master and alternate format buffers is a highly and extensively structured set of data which requires a significant storage overhead since the value of each formatting parameter is stored regardless of its equality to the values of the same formatting parameter in the other stored formats. Some portions, or all, of these stored formats can be reestablished, after a formatting change, through formatting directives provided by the architecture. However, this does not solve the problem of returning to the formatting values in effect immediately before a formatting change, because a return to the master or alternate format is a return to a formatting state established at the beginning of the document.
It would, therefore, significantly reduce both storage overhead for storing formatting parameter values and operator time in making formatting changes if a technique for temporary formatting changes was available which allowed a return to a previous format without having to remember anything about the values of that previous format.